package cc.vv.btpartyjob.partyservice.adapter

import android.annotation.SuppressLint
import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.btpartyjob.jnimodule.moudel.bean.VolProBean
import cc.vv.btpartyjob.partyservice.R

/**
 * 志愿项目adapter
 * Created by Chen.qi on 2018/10/24.
 */
class VolunteerProjectAdapter(layoutResId: Int) : SimpleCommonAdapter<VolProBean>(layoutResId) {
    @SuppressLint("SetTextI18n")
    override fun convert(helper: ExtendViewHolder, item: VolProBean, position: Int) {
        //项目名称
        helper.getView<TextView>(R.id.tv_ivp_projectName)?.text = item.projectName

        //举办时间
        helper.getView<TextView>(R.id.tv_ivp_createTime)?.text = item.holdingTime

        //举办单位
        helper.getView<TextView>(R.id.tv_ivp_createUnit)?.text = item.holdingCompany

        //已报名
        helper.getView<TextView>(R.id.tv_ivp_status)?.text = "已报名：${item.signupPeople}"

    }
}